import request from '@/utils/request'

// 查询警务区列表
export function getPoliceAreaList(data, query) {
    return request({
        url: '/bussiness/policearea/list',
        method: 'post',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 获取部门警务区树列表/bussiness/policearea/policeAreaTree
export function policeAreaTreeList(policeAreaType) {
    return request({
        url: '/bussiness/policearea/policeAreaTree?policeAreaType=' + policeAreaType,
        method: 'get',
        isEncrypt: true
    })
}

// 查询警务区详情
export function getPoliceAreaInfo(id) {
    return request({
        url: '/bussiness/policearea/info?id=' + id,
        method: 'get',
        isEncrypt: true
    })
}

// 新增警务区
export function createPoliceArea(data) {
    return request({
        url: '/bussiness/policearea/add',
        method: 'post',
        data: data,
        isEncrypt: true
    })
}

// 修改警务区
export function editPoliceArea(data) {
    return request({
        url: '/bussiness/policearea/edit',
        method: 'post',
        data: data,
        isEncrypt: true
    })
}

// 删除用户
export function deletePoliceArea(policeareaId) {
    return request({
        url: '/bussiness/policearea/remove?ids=' + policeareaId,
        method: 'post',
        isEncrypt: true
    })
}



